<div class="page">
	<div class="accountInfo">
		<p>
			<span>后台管理系统</span>
		</p>
		<p>
			
			<?php if ($_SESSION['acct']['acclevel'] == 3):?>
			<?php 
				$acct = Acctuser::find('acctname = ?',$_SESSION['acct']['acctname'])->getOne();
			?>
			<span>用户账号:<?php echo $_SESSION['acct']['acctname'];?></span>
			<span>用户密码: ******</span>
			<span>话费余额: <?php echo sprintf('%f',$acct->balance);?></span>
			<span>昨天消费: 0</span>
			<span>激活日期: <?php echo $_SESSION['acct']['activedate']?></span>
			<span>过期日期: <?php echo $_SESSION['acct']['expireddate']?></span>
			
			<?php endif;?>
			
			
			<?php if ($_SESSION['acct']['acclevel'] == 2):?>
			<?php 
				$acct = Acct::find('acctname = ?',$_SESSION['acct']['acctname'])->getOne();
			?>
			<span>话费余额: <?php echo sprintf('%f',$acct->balance);?></span>
			<span>代理ID：<?php echo $_SESSION['acct']['id']?></span>
			<span>用户数: <?php echo Acct::getAcctUser();?></span>
			<span>回铃:<?php echo Rategroup::get_rategroupname($_SESSION['acct']['rategroupid_acall'])?></span>
			<span>呼出:<?php echo Rategroup::get_rategroupname($_SESSION['acct']['rategroupid'])?></span>
			<?php if($acct->is_Onelevel):?>
			<span><a href="<?php echo url("agent/myrate");?>" target="_balank">查看详细</a></span>
			
			<?php endif;?>
			<?php endif;?>
			<?php if($_SESSION['acct']['acclevel'] == 0):?>
			
			
			<span>用户账号:<?php echo $_SESSION['acct']['acctname'];?></span>
			<span>用户密码: ******</span>
			<span>分销总数:<?php 
		    $param = array('admin_id'=>$_SESSION['acct']['id']);
			echo(Acct::find($param)->getCount('id'));
			?></span>
			<span>中继总数:<?php echo Gateway::find()->getCount('id');?></span>
			<span>24H利润: <?php echo $baseinfo['fees']?>-<?php echo $baseinfo['cost']?>=<?php echo $sum_profit;?></span>
			<?php endif;?>
		</p>
	</div> 
	<div style="margin-right: 230px; height: 142px; overflow: auto;" layouth="80" class="pageFormContent">
							
		
<?php if ($_SESSION['acct']['acclevel'] != 3):?>
<h2 align="center">系统公告:</h2>
<div class="divider"></div>
<?php 
	$acct = Acct::find('id = ?',$_SESSION['acct']['id'])->getOne();
	if($acct->is_Onelevel !== false):
?>
<?php 
	$newsconfig = Newsconfig::find()->order('id desc')->limit(0,10)->getAll();
	
	foreach ($newsconfig as $item):
?>
	<?php if(strtotime('-6 day')<$item->created):?>
	<div class="unit"><font color="red"><?php echo $item->content;?>	---- <?php echo date('Y-m-d H:i:s',$item->created);?></font></div>	
	<?php else:?>
	<div class="unit"><?php echo $item->content;?>	---- <?php echo date('Y-m-d H:i:s',$item->created);?></div>	
	
	<?php endif;?>
	<div class="divider"></div>
	<?php endforeach;?>
	
	<?php endif;?>
	<?php endif;?>
						</div>
						
</div>
